blktap2: configurable driver chains
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 9 Nov 2009 19:40:14 +0000 (19:40 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 9 Nov 2009 19:40:14 +0000 (19:40 +0000)
commit8b0f1cdb963fe7702addb1c879ff5d1ffaa1a0b9
tree64bc74d65d0c6de3ef61f9c22a8d581f55e7dd72
parentad91d3c17ba53254d2bc33496aa272d592b27f75
blktap2: configurable driver chains

Blktap2 allows block device drivers to be layered to create more
advanced virtual block devices. However, composing a layered driver is
not exposed to the user. This patch fixes this, and allows the user to
explicitly specify a driver chain when starting a tapdisk process,
using the pipe character ('|') to explicitly seperate layers in a
blktap2 configuration string.

for example, the command:
  ~$ tapdisk2 -n "log:|aio:/path/to/file.img"
will create a blktap2 device where read and write requests are passed
to the 'log' driver, then forwarded to the 'aio' driver.

Signed-off-by: Ryan O'Connor <rjo@cs.ubc.ca>
tools/blktap2/drivers/tapdisk-vbd.c
tools/blktap2/drivers/tapdisk-vbd.h
tools/blktap2/drivers/tapdisk2.c
tools/blktap2/include/list.h